//如果值为空则显示0
routerApp.filter("numNull",function(){
    return function(num){  	
        if(num == 0 || num == null){
            return 0;
        }else{
        	return num;
        }
    }
});
routerApp.filter('cut', function () {
  return function (value, wordwise, max, tail) {
    if (!value) return '';
 
    max = parseInt(max, 10);
    if (!max) return value;
    if (value.length <= max) return value;

    value = value.substr(0, max);
    if (wordwise) {
      var lastspace = value.lastIndexOf(' ');
      if (lastspace != -1) {
        value = value.substr(0, lastspace);
      }
    }

    return value + (tail || ' …');
  };
});
//缴税平台
routerApp.filter("payPlat",function(){
    return function(type){
        if(type == 0 ){
            return "";
        }if(type == 1){
            return "网上办税平台";
        }if(type == 2){
            return "办税大厅";
        }if(type == 3){
            return "业务待办点";
        }if(type == 4){
            return "自助终端";
        }else{
            return"未知";
        }
    }
});
//逾期判断
routerApp.filter("overdue",function(){
    return function(type){
        if(type == 0 ){
            return "未逾期";
        }if(type != 0){
            return "已逾期";
        }
    }
});
//对账异常判断
routerApp.filter("overdue",function(){
    return function(type){
        if(type == 0 ){
            return "未逾期";
        }if(type != 0){
            return "已逾期";
        }
    }
});
//支付宝微信
routerApp.filter("payWayEn",function(){
    return function(type){
        if(type == 'alipay'){
            return "支付宝";
        }if(type == 'weixin'){
            return "微信";
        }else{
        	return ""
        }
    }
});
//网银 | 支付宝微信
routerApp.filter("payWay",function(){
    return function(type){
        if(type == 1){
            return "";
        }if(type == 2){
            return "网银";
        }else{
        	return ""
        }
    }
});
//税款种类
routerApp.filter("taxType",function(){
    return function(type){
        if(type == 10){
            return "正税";
        }if(type == 20){
            return "滞纳金";
        }
        if(type == 30){
            return "罚款";
        }
        if(type == 31){
            return "涉税罚款";
        }
        if(type == 32){
            return "行为罚款";
        }
        if(type == 40){
            return "没收违法所得";
        }
        if(type == 50){
            return "利息";
        }
        if(type == 90){
            return "其他";
        }else{
        	return ""
        }
    }
});